import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import father from './modules/father'
import app from './modules/app'
import getters from './getters'
import auth from './modules/auth'
import permission from './modules/permission'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isLogin: false, // 是否登录状态
    apiPermission: [], // 全局保存api权限
    includes: [], // keep-alive配置
    sidebarSwitch: true, // 侧边栏开关状态
    menuActive: '', // 菜单高亮
    breadList: [], // 面包屑
    fullPath: '', // 全局path
    supMap: {} // 实例化地图的缓存
  },
  mutations,
  modules: {
    app,
    father,
    auth,
    permission
  },
  getters
})
